//
// Created by 陈奕锟 on 2022/10/4.
//

#ifndef OPENGL_BASICRENDERERPROJECT_TEXTURE_H
#define OPENGL_BASICRENDERERPROJECT_TEXTURE_H

#endif //OPENGL_BASICRENDERERPROJECT_TEXTURE_H

#pragma once

#include <string>

#include "CompilerExtension.h"
#include "GLErrorDisposition.h"

class Texture
{
private:
    unsigned int m_RendererID;
    std::string m_Filepath;
    unsigned char* m_LocalBuffer;
    int m_Width, m_Height, m_BPP;

public:
    Texture(const std::string& path);
    ~Texture();

    void Bind(unsigned int slot = 0) const;
    void Unbind() const;

    inline int GetWidth() const { return m_Width; }
    inline int GetHeight() const { return m_Height; }
};